package com.holyant.report.dto;

import cn.hutool.core.util.ObjectUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;

@Data
@ApiModel("产品销量")
public class RptSaleDayQtyDto implements Comparable<RptSaleDayQtyDto> {
    private Long goodsId;
    @ApiModelProperty("商品名称")
    private String goodsName;
    @ApiModelProperty("销量")
    private BigDecimal qty;

    @Override
    public int compareTo(RptSaleDayQtyDto o) {
        return -ObjectUtil.compare(qty, o.qty);
    }
}
